<?
	$action = $_REQUEST["action"];
	$idhoatdonghocsinh = $_REQUEST['idhs'];
	$id = $_REQUEST["id"];
	switch($action) {
		case "enable":
		{
			$sqlUpdate = "UPDATE hoatdonglop SET status = 1 WHERE idhoatdonglop = $id";	
			$query = mysql_query($sqlUpdate) or die("can not enable status hoatdonglop");
			echo "<script>alert('Kích hoạt thành công');</script>";		
			echo "<script> location='?go=hoatdonglop&action=view&idhs=$idhoatdonghocsinh&page=1';</script>";
		}
		break;
		case "disable":
		{
			$sqlUpdate = "UPDATE hoatdonglop SET status = 0 WHERE idhoatdonglop = $id";	
			$query = mysql_query($sqlUpdate) or die("can not disable status hoatdonglop");
			echo "<script>alert('Vô hiệu hóa thành công');</script>";	
			echo "<script> location='?go=hoatdonglop&action=view&idhs=$idhoatdonghocsinh&page=1';</script>";
		}
		break;
	}
?>